﻿<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-access="property" default-lazy="true" namespace="Cms.Domain" assembly="Cms.Domain">
  <class name="PluginTemplate" table="cmsPluginTemplate">
    <cache usage="read-write" />
    <id name="ID" type="System.Int32" unsaved-value="0">
      <column name="ID" />
      <generator class="identity" />
    </id>
    <property name="Name" type="System.String">
      <column name="Name" not-null="true" />
    </property>
    <property name="Description" type="System.String">
      <column name="Description" length="1000000" />
    </property>
    <bag cascade="all-delete-orphan" inverse="true" name="Literals" mutable="true">
      <cache usage="read-write" />
      <key>
        <column name="TemplateID" />
      </key>
      <one-to-many class="PluginTemplateLiteral" />
    </bag>
    <many-to-one class="Plugin" name="Plugin">
      <column name="PluginID" not-null="true" />
    </many-to-one>
    <many-to-one cascade="all" class="SourceCode" name="SourceCode">
      <column name="SourceCodeID" not-null="true" />
    </many-to-one>
    <many-to-one class="Site" name="Site">
      <column name="SiteID" />
    </many-to-one>
  </class>
</hibernate-mapping>